package langchaingo

const (
	// ChatId
	ChatId = "ChatId"

	Input = "input"

	OutPutKey = "text"

	History = "history"

	InPromptKey  = "in_prompt"
	LLMPromptKey = "prompt_string"
	LLMOutPutKey = "out_string"
)

func ErrReturn(out map[string]any) map[string]any {
	if out == nil {
		return nil
	}
	return map[string]any{
		LLMPromptKey: out[LLMPromptKey],
		LLMOutPutKey: out[LLMOutPutKey],
	}
}

func OkReturn(out map[string]any, data any) map[string]any {
	return map[string]any{
		OutPutKey:    data,
		LLMPromptKey: out[LLMPromptKey],
		LLMOutPutKey: out[LLMOutPutKey],
	}
}
